/**
 *博尔信基础开发平台
 *<br> 版权声明：厦门博尔信软件有限公司版权所有,违者必究
 *<br> Copyright:  Copyright (c) 2012
 *<br> Company:pearlsoft
 *<br> @author 蒋勇华
 *<br> 2012-5-14
 *<br> @version 1.0
 *————————————————————————————————————
 *修改记录
 *    修改者：
 *    修改时间：
 *    修改原因：
 *——————————————————————————————————————
 */
package com.pearlsoft.webapp.rms.auditconfig;

import com.pearlsoft.webapp.core.annotation.DataSetHandlerComponent;
import com.pearlsoft.webapp.core.dataset.DataSet;
import com.pearlsoft.webapp.core.dataset.Record;
import com.pearlsoft.webapp.core.dataset.Result;
import com.pearlsoft.webapp.core.web.basehandler.AbsDataSetHandler;
import com.pearlsoft.webapp.core.web.session.SessionProfile;
import com.pearlsoft.webapp.rms.auditconfig.service.AuditConfigService;
import com.pearlsoft.webapp.rms.resapply.service.ResApplyService;

/**
 *描述： 资源配置审批
 */
@DataSetHandlerComponent(name = "AuditConfigDataSetHandler")
public class AuditConfigDataSetHandler extends AbsDataSetHandler{


	@Override
	public void handler(DataSet ds, Result result) throws Exception {
		
	}


	@Override
	public void save(DataSet ds, Result result) throws Exception {
		Record record = ds.getCurrentRecord();
		AuditConfigService auditConfigService = this.getBean("auditConfigService", AuditConfigService.class);
		auditConfigService.save(record);
		result.getRecords().add(record);
	}
	public void submitApply(DataSet ds, Result result) throws Exception {
		Record record = ds.getCurrentRecord();
		AuditConfigService auditConfigService = this.getBean("auditConfigService", AuditConfigService.class);
		auditConfigService.apply(record);
		result.getRecords().add(record);
	}

	@Override
	public void delete(DataSet ds, Result result) throws Exception {
		
	}


	@Override
	public void deleteAll(DataSet ds, Result result) throws Exception {
		
	}

}
